<template>
  <div>
    请完善信息
    <el-row>
      <el-col :span="6"></el-col>
      <el-col :span="12">
        收货人：<el-input v-model="orderObj.consignee"></el-input>
        送货地址：<el-input v-model="orderObj.address"></el-input>
        收货电话：<el-input v-model="orderObj.phone"></el-input>
        <el-button type="primary" @click="addOrder()">提交订单</el-button>
      </el-col>
      <el-col :span="6"></el-col>
    </el-row>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      orderObj:{}
    }
  },methods:{
    addOrder(){
      this.orderObj.totalPrice = sessionStorage.getItem("totalPrice");
      axios.get("/project/order/add",{params:this.orderObj}).then(resp=> {
        if(resp.data=="ok"){
          sessionStorage.removeItem("totalPrice");
          this.$router.push("/shopIndex")
        }
      });
    }
  }
}
</script>

<style scoped>

</style>